//
//  YsDocUploadModel.h
//  YsCloudFileManageSDK
//
//  Created by 宋宏康 on 2020/2/24.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "YsCloudFileUploadReamModel.h"
#import "NSString+YscCloudFileTools.h"


typedef NS_ENUM(NSInteger, YsFileType) {
    YsFileTypePhoto,
    YsFileTypeVideo,
    YsFileTypeDocument
};

@interface YsDocUploadModel : NSObject
- (instancetype)initWithProductUploadModel:(BOOL)productLoadModel;

// 方便操作(暂停取消)正在上传的文件
@property (nonatomic, strong) NSURLSessionDataTask *dataTask;
// 总大小
@property (nonatomic, assign) int64_t totalSize;
// 总片数
@property (nonatomic, assign) NSInteger totalCount;
// 已上传片数
@property (nonatomic, assign) NSInteger uploadedCount;
// 上传所需参数
@property (nonatomic, copy) NSString *upToken;
// 下载的状态
// // 是否下载 1.未上传载 2.等待中 3.正在上传  4.上传完成  5.暂停 6.上传失败
@property (nonatomic, assign) int uploadStatus;
// 缓存文件路径
@property (nonatomic, copy) NSString *filePath;
// 用来保存文件名使用
@property (nonatomic, copy) NSString *lastPathComponent;
// 任务等待时间
@property (nonatomic, strong) NSString *waitTaskTime;
// 任务等待时间
@property (nonatomic, assign) int createTime;

// 用来保存文件名使用
@property (nonatomic, copy) NSString *accountCode;
// 用来保存文件名使用
@property (nonatomic, copy)  NSError *error;
// 以下属性用于给上传列表界面赋值
@property (nonatomic, assign) YsFileType fileType;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *progressLableText;
@property (nonatomic, assign) CGFloat uploadPercent;
@property (nonatomic, copy) void(^progressBlock)(CGFloat uploadPersent,NSString *progressLableText);
@property (nonatomic, copy) NSString *fileName;
@property (nonatomic, copy) NSString *fileHash;

// 接下来调用的url
@property (nonatomic, copy) NSString *requestUrl;
// 保存上传成功后调用保存接口的参数
@property (nonatomic, strong) NSMutableDictionary *parameters;
// 上传任务的realm数据库
@property (nonatomic, strong) YsCloudFileUploadReamModel *fileUploadReamModel;

@end
